package cn.yuanqiao.archive.storeRoom.mapper;

import cn.yuanqiao.archive.storeRoom.domain.Folder;
import cn.yuanqiao.archive.storeRoom.domain.Yqda;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface UpDownShelvesMapper {
    public int getCategoryCount(@Param("type") String type, @Param("code") String code);

    public List<Map<String, Object>> getList(@Param("sql") String sql);

    public ArrayList<Map<String, Object>> getCategoryByDa(@Param("subtablename") String subtablename, @Param("code")  String code, @Param("subfoldername")String subfoldername);

    public int updateState(@Param("folderId") Long id1, @Param("code") String code, @Param("creator")Long creator, @Param("lastupdatetime")Date date, @Param("boxId")Long boxId);


    public int updateGrid(@Param("ys") int zongys, @Param("gzId") Long gz_id, @Param("code") String code);

    public List<Long> getDaIdList(@Param("id") Long id1, @Param("code") String code);

    public int updateGridByBox(@Param("gzId")Long gz_id, @Param("code")String code);

    public String getCategoryStoreMode(@Param("subtablename") String subtablename, @Param("fordertablename")  String fordertablename, @Param("code") String code);

    public Map<String, Object> getSpecByBoxId(@Param("boxId") Long id1, @Param("code") String code);

    public int updateStateByGrounding(@Param("date") Date date, @Param("position") String position, @Param("code") String code, @Param("folderId") Long id1, @Param("time")String time, @Param("userId")Long userId, @Param("boxId")Long boxId, @Param("gzId") Long gzId, @Param("sjType") String sjType);

    public void updateGridByGrounding(@Param("zongys") int zongys, @Param("gzId") Long gzId, @Param("code") String code);

    public int getSumYs(@Param("id") Long id, @Param("code") String code);

    public int updatePosition(@Param("gzId") Long gz_id, @Param("folderId") Long id, @Param("position") String position, @Param("code") String code, @Param("time")String time, @Param("userId")Long userId, @Param("date") Date date, @Param("boxId")Long boxId);

    public int updateGridByfolderId(@Param("zongys") int zongys, @Param("gzId") Long gzId, @Param("code") String code);

    public int offShelffolderId(@Param("zongys") int zongys, @Param("gzId") Long gz_id, @Param("code") String code);

    public int getCountByfolderId(@Param("folderId")Long id1, @Param("code") String code);

    public Map<String, Object> getDaMessageById(@Param("subtablename") String subtablename, @Param("folderId") Long id1);

    public Folder getFolderById(@Param("folderId") Long folderId, @Param("code")String code);

    public List<Map<String, Object>> getDaList(@Param("folderId") Long folderId, @Param("code") String code);


    public List<Integer> inspectIdsByDa(@Param("ids") String ids, @Param("code") String code);

    public List<Integer> inspectIdsByFolder(String ids, String code);

    List<Yqda> getyqDaList(@Param("code")String code, @Param("boxId") Long id);

    List<Yqda> getFolderDaList(@Param("code")String code, @Param("folderId") Long id);

    String selectTableName(@Param("foldertableName") String foldertableName, @Param("tableName")String tableName);

    String selectJianIds(@Param("folderId") long da_id, @Param("tableName") String tableName);
}
